package com.ailatrieuphu.adapter;

import java.util.ArrayList;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.ailatrieuphu.R;
import com.ailatrieuphu.item.Table;

public class TableAdapter extends ArrayAdapter<Table> {

	Context context;
	ArrayList<Table> items;

	public TableAdapter(Context context, ArrayList<Table> items) {
		super(context, R.layout.list_altp, items);
		this.items = items;
		this.context = context;
	}
	ViewHolder holder;
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		if(convertView==null){
			convertView=View.inflate(context, R.layout.row_table, null);
			holder=new ViewHolder();
		}
		
		holder=(ViewHolder) convertView.getTag();
		
		
		return super.getView(position, convertView, parent);
	}

	class ViewHolder{
		TextView countPlayer,idTable,status,password ;
	}
	
	
}
